package com.xw.enums;

import lombok.Getter;

/**
 * @Description: 返回结果枚举
 * @Author: y
 * @CreateDate: 9/13/21 9:29 AM
 * @Version: 1.0
 */
@Getter
public enum ResultEnum {

    //request.js if the custom code is not 20000, it is judged as an error.
    FAIL(10000, "请求失败"),
    PARAM_ERROR(10001, "参数不正确"),
    DATA_EXIST(10002, "数据已存在"),
    PLEASE_TRY_AGAIN_LATER(10003, "请稍后再试"),
    PLEASE_RELOGIN(10004, "请重新登陆！"),
    ROLE_NOT_EXIST(10005, "路由不存在！"),
    WRONG_ACCOUNT_OR_PASSWORD(10008, "账号或密码错误"),
    OLD_PWD_ERR(10009, "旧密码错误!"),
    VALID_CARD_FAIL(10010, "验证身份证不合法"),
    PASSPORT_FORMAT(10015, "护照格式不合法"),
    REPEAT_RESERVE(10011, "请勿重复预约"),
    IMG_TYPE_ERR(10012, "图片类型错误!"),
    DATE_NOT_RESERVE(10013, "该日期不可预约"),
    RESERVE_FULL(10014, "预约已满"),


    SUCCESS(20000, "操作成功"),


    WECHAT_MP_ERROR(30000, "微信公众账号方面错误"),


    //50008: Illegal token; 50012: Other clients logged in; 50014: Token expired;
    ILLEGAL_TOKEN(50008, "非法token"),
    OTHER_CLIENTS_LOGGED_IN(50012, "已在其他客户端登陆"),
    TOKEN_EXPIRED(50014, "token过期"),
    ;

    private Integer code;
    private String msg;

    ResultEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}